package com.etc.controller;

import com.etc.service.SecondTypeOfNameService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
@RequestMapping("/SecondTypeNameController")
public class SecondTypeNameController {


    @Autowired
    SecondTypeOfNameService service;

    /**
     * 显示视频编号对应的二级分类名称
     * @param videoId
     * @return
     */
    @RequestMapping("/showSecondTypeOnPlay")
    @ResponseBody
    public List<String> showSecondTypeOnPlay(Integer videoId){
        List<String> list = service.getSecondTypeNameByVideoId(videoId);
        return list;
    }
}
